#!/bin/bash
source tools/getenv.sh


if [[ "$env" == "test" || "$env" == "prod" ]]; then
  if [[ ! -h $current_dir ]]; then
    echo -e "$BOLODRED $current_dir 不是软连，rollbackback命令仅支持软连$RESET"
    exit 1
  fi

  echo ""
  echo -e "$GREEN ------------------------------------------------------ $RESET"
  echo ""
  ls -1dr "${real_app_root_path}.backup-"* 2>/dev/null
  echo ""
  echo ""

else
  echo -e "$BOLD_WHITE $env 环境，不支持回滚 $RESET"
  exit 0
fi
